<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 缓存设置
// +----------------------------------------------------------------------

return [
    // 驱动方式
    // 'type'   => 'File',
    //缓存配置为复合类型
    'type' => 'redis',
    // 缓存保存目录
    'path'   => '',
    // 缓存前缀
    'prefix' => '',
    // 缓存有效期 0表示永久缓存
    'expire' => 0,
    'default' => [
        'type' => 'redis',
        'expire' => 0,
        //'缓存前缀
        'prefix' => '',
        'path' => '../runtime/cache',
    ],
    'redis'   => [
        'type'   => 'redis',
        'host'   => '127.0.0.1', // Redis服务器地址
        'port'   => 6379,        // Redis端口
        'password' => '',        // Redis密码，如无则留空
        'select' => 0,           // 使用哪一个数据库
        'timeout' => 0,          // 连接超时时间
        'expire'  => 0,          // 默认缓存过期时间
        'persistent' => false,   // 是否长链接
    ],
];
